package com.shuma.userservice.controller;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shuma.userservice.domain.pojo.Users;
import com.shuma.userservice.query.PageQuery;
import com.shuma.userservice.service.UsersService;
import lombok.RequiredArgsConstructor;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/users")
@RequiredArgsConstructor
public class PageController {

    private final UsersService usersService;

    @GetMapping
    public Page<Users> queryItemByPage(PageQuery query) {
        return usersService.getUsersByPage(query);
    }
}
